package com.three.core.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 金额明细
 * @TableName tb_user_detail
 */
@TableName(value ="tb_user_detail")
@Data
public class UserDetail implements Serializable {
    /**
     * 明细ID
     */
    @TableId
    private String detailId;

    /**
     * 外键，关联用户ID
     */
    private Integer userId;

    /**
     * 支出金额
     */
    private Integer expenditure;

    /**
     * 实际充值金额
     */
    private BigDecimal rechargeMoney;

    /**
     * 优惠金额
     */
    private BigDecimal discountsMoney;

    /**
     * 实际到账金额 (实际充值金额+优惠金额)
     */
    private Integer accountMoney;

    /**
     * 充值时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date rechargeTime;

    /**
     * 支出时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date expenditureTime;

    /**
     * 外键关联门店id
     */
    private Integer storeId;

    private FrontUser frontUser;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}